import { getUserProfile } from "../../utils/http"

Page({
  data: {
    user: {},
    allRatings: []
  },

  onShow () {
    getUserProfile().then(data => {
      this.selectComponent('#chart').update(data.ratings.masterNode)
      this.setData({
        user: data.user,
        allRatings: data.ratings.userKnowledgeRatings
      })
    })
  }
})
